<ion-header class="reset-password-header">
	<ion-navbar hideBackButton="true">
    <ion-buttons start class="back-buttons" navPop>
      <button ion-button clear></button>
    </ion-buttons>
    <ion-title float-left>重置密码</ion-title>
	</ion-navbar>
</ion-header>
<ion-content class="reset-password-section">

	<form #resetPasswordFormRef="ngForm" novalidate>
		<ion-list no-lines>

      <!--pattern="\\w{6,12}"-->
			<ion-item>
        <div class="old-password"></div>
				<input [(ngModel)]="reset_password.old_password"
               name="old_password"
               [type]="switchover_password.type"
               placeholder="请输入原密码"
               #oldPasswordRef="ngModel"
               spellcheck="false"
               autocapitalize="off"
               minlength="6"
               required
        />
        <span *ngIf="reset_password.old_password.length>0"
              class="show-pwd"
              [class.unvisible]="switchover_password.status"
              [class.visible]="!switchover_password.status"
              (click)="switchoverPassword(switchover_password)">
        </span>
      </ion-item>

      <!--pattern="\\w{6,12}"-->
			<ion-item>
        <div class="new-password"></div>
				<input [(ngModel)]="reset_password.new_password"
               name="new_password"
               [type]="switchover_password.type"
               placeholder="请输入密码"
               #newPasswordRef="ngModel"
               minlength="6"
               required
        >
        <span *ngIf="reset_password.new_password.length>0"
              class="show-pwd"
              [class.unvisible]="switchover_password.status"
              [class.visible]="!switchover_password.status"
              (click)="switchoverPassword(switchover_password)">
        </span>
			</ion-item>

      <!--pattern="\\w{6,12}"-->
			<ion-item>
        <div class="new-password"></div>
				<input [(ngModel)]="reset_password.req_password"
               name="req_password"
               [type]="switchover_password.type"
               placeholder="确定新密码"
               #reqPasswordRef="ngModel"
               minlength="6"
               required
        >
        <span *ngIf="reset_password.req_password.length>0"
              class="show-pwd"
              [class.unvisible]="switchover_password.status"
              [class.visible]="!switchover_password.status"
              (click)="switchoverPassword(switchover_password)">
        </span>
			</ion-item>

		</ion-list>
    <ul class="show-other">
      <li *ngIf="!resetPasswordFormRef.valid">登录密码为6-16位字符,包括数字和字母</li>
    </ul>

    <button ion-button
            [disabled]="!resetPasswordFormRef.valid"
            (click)="executeUpdatePassword()"
            type="submit"
            block
    >提&nbsp;&nbsp;&nbsp;交</button>

	</form>

  <button class="do-forget"
          block
          ion-button
          small
          clear
          (click)="doForget()"
  >忘记密码</button>

</ion-content>
